<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .zhuche {


            flex-wrap: wrap;
            width: 600px;

            margin: 0 auto;
        }
    </style>
</head>

<body>
    <div id="root">
        <form class="zhuche" @sumbit.prevent="sumbit">

            账号：<input v-model="account" class="zhanghao" type="text"><br>

            密码：<input v-model="password" class="mima" type="password"><br>

            性别：男<input v-model="sex" value="gg" type="radio" name="sex"> 女<input value="mm" v-model="sex" type="radio"
                name="sex"><br>

            爱好：唱歌<input v-model="hobby" value="sings" type="checkbox"> 游戏<input v-model="hobby" value="game"
                type="checkbox"> 黑丝<input v-model="hobby" value="heisi" type="checkbox"><br>

            <select v-model="city" name="xuexiao" id="xuexiao">
                <option value="">请选择地区</option>
                <option value="hubei">湖北</option>
                <option value="jiangxi">江西</option>
                <option value="shanghai">伤害</option>
            </select>

            <input v-model="agree" type="checkbox"> 阅读并接受我的协议~ <a href="#">《用户协议》</a> <br>
            <button>提交</button>
        </form>
    </div>

    <script>
        new Vue({
            el: '#root',
            data: {
                userInfo: {
                    account: '',
                    password: '',
                    sex: 'gg',
                    hobby: [],
                    city: '',
                    agree: ''
                },


            },
            methods: {
                sumbit() {
                    console.log(userInfo);
                }
            },

        })
    </script>
</body>

</html>